package com.lyl.projectspringboot.dto.dtoMapper;

import com.lyl.projectspringboot.dto.LoginDto;
import com.lyl.projectspringboot.entity.User;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper
public interface LoginMapper {

    //将 Entity 对象转换为 Dto 对象
    @Mappings({
            @Mapping(source = "userId", target = "userID"),
            @Mapping(source = "userPassword", target = "userPWD"),
    })
    public LoginDto toDto(User user);


}
